/*
 *  Copyright 2019-2020 Zheng Jie
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package top.dzygod.modules.oa.service;

import org.springframework.web.multipart.MultipartFile;

/**
* @author dzyGod
* @date 2019-09-05
*/
public interface MinioService {

    /**
     *  下载
     * @param bucketName bucket名称
     * @param category 文件夹路径
     * @param fileName 文件名
     * @return 比特数组
     */
    byte[] getFile(String bucketName, String category, String fileName);

    /**
     * 存储
     * @param bucketName bucket名称
     * @param category   文件夹路径
     * @param fileName   文件名
     * @param buffer     比特数组
     * @return 上传后状态
     */
    boolean storeFile(String bucketName, String category, String fileName, MultipartFile file);


    // 删除
    void delete(String bucketName, String category, String objectName);

}
